package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.system.domain.parm.SysEnterpriseCertificationParm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysEnterpriseCertificationMapper;
import com.ruoyi.system.domain.SysEnterpriseCertification;
import com.ruoyi.system.service.ISysEnterpriseCertificationService;

/**
 * 商家企业认证Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-06
 */
@Service
public class SysEnterpriseCertificationServiceImpl implements ISysEnterpriseCertificationService 
{
    @Autowired
    private SysEnterpriseCertificationMapper sysEnterpriseCertificationMapper;

    /**
     * 查询商家企业认证
     * 
     * @param id 商家企业认证主键
     * @return 商家企业认证
     */
    @Override
    public SysEnterpriseCertification selectSysEnterpriseCertificationById(String id)
    {
        return sysEnterpriseCertificationMapper.selectSysEnterpriseCertificationById(id);
    }

    @Override
    public List<SysEnterpriseCertification> selectSysEnterpriseCertificationByBusinessId(String businessId) {
        return sysEnterpriseCertificationMapper.selectSysEnterpriseCertificationByBusinessId(businessId);
    }

    /**
     * 查询商家企业认证列表
     * 
     * @param sysEnterpriseCertification 商家企业认证
     * @return 商家企业认证
     */
    @Override
    public List<SysEnterpriseCertification> selectSysEnterpriseCertificationList(SysEnterpriseCertification sysEnterpriseCertification)
    {
        return sysEnterpriseCertificationMapper.selectSysEnterpriseCertificationList(sysEnterpriseCertification);
    }

    /**
     * 新增商家企业认证
     * 
     * @param sysEnterpriseCertification 商家企业认证
     * @return 结果
     */
    @Override
    public int insertSysEnterpriseCertification(SysEnterpriseCertificationParm sysEnterpriseCertification)
    {
        sysEnterpriseCertification.setCreateTime(DateUtils.getNowDate());
        return sysEnterpriseCertificationMapper.insertSysEnterpriseCertification(sysEnterpriseCertification);
    }

    /**
     * 修改商家企业认证
     * 
     * @param sysEnterpriseCertification 商家企业认证
     * @return 结果
     */
    @Override
    public int updateSysEnterpriseCertification(SysEnterpriseCertification sysEnterpriseCertification)
    {
        sysEnterpriseCertification.setUpdateTime(DateUtils.getNowDate());
        return sysEnterpriseCertificationMapper.updateSysEnterpriseCertification(sysEnterpriseCertification);
    }

    /**
     * 批量删除商家企业认证
     * 
     * @param ids 需要删除的商家企业认证主键
     * @return 结果
     */
    @Override
    public int deleteSysEnterpriseCertificationByIds(Long[] ids)
    {
        return sysEnterpriseCertificationMapper.deleteSysEnterpriseCertificationByIds(ids);
    }

    /**
     * 删除商家企业认证信息
     * 
     * @param id 商家企业认证主键
     * @return 结果
     */
    @Override
    public int deleteSysEnterpriseCertificationById(Long id)
    {
        return sysEnterpriseCertificationMapper.deleteSysEnterpriseCertificationById(id);
    }
}
